package net.uiiang.android.alkaid.object;

import android.graphics.drawable.Drawable;

public class FileItem implements Comparable<FileItem> {

    private String title = "";
    private Drawable mIcon;
    private String desc = "";
    private boolean mSelectable = true;
    private String fileType = "";
    private String fileExtension = "";
    private boolean fileFavorite = false;

    private boolean checked;

    public boolean isFileFavorite() {
        return fileFavorite;
    }

    public void setFileFavorite(boolean fileFavorite) {
        this.fileFavorite = fileFavorite;
    }

    public String getFileExtension() {
        return fileExtension;
    }

    public void setFileExtension(String fileExtension) {
        this.fileExtension = fileExtension;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public boolean isSelectable() {
        return mSelectable;
    }

    public void setSelectable(boolean selectable) {
        mSelectable = selectable;
    }

    // public FileItem(String title, Drawable bullet) {
    // this.mIcon = bullet;
    // this.title = title;
    // }
    //
    // public FileItem(String title, String desc, Drawable bullet) {
    // this.mIcon = bullet;
    // this.title = title;
    // this.desc = desc;
    // }
    //
    // public FileItem(String title, String desc, Drawable bullet,String
    // fileType) {
    // this.mIcon = bullet;
    // this.title = title;
    // this.desc = desc;
    // this.fileType = fileType;
    // }

    public FileItem(String title, String desc, Drawable bullet,
            String fileType, String fileExtension, boolean fileFavorite) {
        this.mIcon = bullet;
        this.title = title;
        this.desc = desc;
        this.fileType = fileType;
        this.fileExtension = fileExtension;
        this.fileFavorite = fileFavorite;
    }

    // public FileItem(String title, String desc, Drawable bullet,String
    // fileType,boolean checked) {
    // this.mIcon = bullet;
    // this.title = title;
    // this.desc = desc;
    // this.fileType = fileType;
    // this.checked = checked;
    // }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setIcon(Drawable icon) {
        mIcon = icon;
    }

    public Drawable getIcon() {
        return mIcon;
    }

    public int compareTo(FileItem other) {
        if (this.title != null)
            return this.title.compareTo(other.getTitle());
        else
            throw new IllegalArgumentException();
    }

}
